# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=nemesis
pkgver=331.5aee868
pkgrel=2
pkgdesc='A command-line network packet crafting and injection utility.'
groups=('blackarch' 'blackarch-networking')
arch=('x86_64' 'aarch64')
url='https://github.com/troglobit/nemesis'
license=('BSD')
depends=('glibc' 'libnet' 'libpcap')
makedepends=('git')
source=("git+https://github.com/troglobit/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  ./autogen.sh
  ./configure --prefix=/usr
}

build() {
  cd $pkgname

  make -j1
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md ChangeLog.md
  #install -Dm644 -t "$pkgdir/usr/share/man/man1/" man/*.1
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

